﻿namespace Softserve.Pottery.Manufacturing.Domains
{
    using System;
    using System.Collections.Generic;
    using System.Data.Services.Common;
    using System.Runtime.Serialization;
    using Softserve.Pottery.Infrastructure;
    using Softserve.Pottery.Infrastructure.Interfaces;

    /// <summary>
    /// Contains info about batch domain
    /// </summary>
    [DataContract]
    [DataServiceEntity]
    public class Batch : IValidatable, IDomain
    {
        public Batch() { }

        #region Properties
        /// <summary>
        /// Batch ID
        /// </summary>
        [DataMember]
        public int Id
        {
            get { return m_Id; }
            set { m_Id = value; }
        }

        /// <summary>
        /// Batch creation date
        /// </summary>
        [DataMember]
        public DateTime DateCreate
        {
            get { return m_DateCreated; }
            set { m_DateCreated = value; }
        }

        [DataMember]
        public int MasterId
        {
            get { return m_MasterId; }
            set { m_MasterId = value; }
        }

        [DataMember]
        public List<int> ItemCollection
        {
            get { return m_ItemCollection; }
            set { m_ItemCollection = value; }
        }

        [DataMember]
        public MaterialType Material
        {
            get { return m_Material; }
            set { m_Material = value; }
        }

        [DataMember]
        public List<int> ApprovementListId
        {
            get { return m_ApprovementListId; }
            set { m_ApprovementListId = value; }
        }
        
        #endregion

        #region Methods

        public bool Validate()
        {
            return true;
        }

        #endregion

        #region Private members

        private int m_Id = default(int);

        private DateTime m_DateCreated = default(DateTime);

        private int m_MasterId = default(int);

        private List<int> m_ItemCollection = new List<int>();

        private MaterialType m_Material = default(MaterialType);

        private List<int> m_ApprovementListId = new List<int>();

        #endregion
    }
}
